home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
PInterfaces
/
NVRAM.p
< prev
next >
Wrap
Text File
|
1996-05-01
|
3KB
|
122 lines
{
File: NVRAM.p
Contains: NVRAM FPI data structures and function prototypes
Version: Technology:
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT NVRAM;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __NVRAM__}
{$SETC __NVRAM__ := 1}
{$I+}
{$SETC NVRAMIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __TYPES__}
{$I Types.p}
{$ENDC}
{$IFC UNDEFINED __KERNEL__}
{$I Kernel.p}
{$ENDC}
{$IFC UNDEFINED __OSUTILS__}
{$I OSUtils.p}
{$ENDC}
{$IFC UNDEFINED __ERRORS__}
{$I Errors.p}
{$ENDC}
{$PUSH}
{$ALIGN MAC68K}
{$LibExport+}
{$IFC FOR_SYSTEM8_PREEMPTIVE }
{
NVRAM Error Return Code
}
CONST
NVRAMnoErr = 0;
NVRAMInvalidParm = -50;
NVRAMReadFailed = -19;
NVRAMWriteFailed = -20;
NVRAMServiceFailed = -18;
NVRAMInstallFailed = -26;
{
NVRAM Request Code
}
kNVRAMpramInitMsg = 1;
kNVRAMpramReadMsg = 2; { This include read access to System Parameters and XPRAM }
kNVRAMpramWriteMsg = 3; { This include write access to System Parameters and XPRAM }
kNVRAMrpramReadMsg = 4;
kNVRAMrpramWriteMsg = 5;
kNVRAMReadMsg = 6;
kNVRAMWriteMsg = 7;
kNVRAMOpenFirmwareReadMsg = 8;
kNVRAMOpenFirmwareWriteMsg = 9;
kNVRAMNameRegistryReadMsg = 10;
kNVRAMNameRegistryWriteMsg = 11;
kNVRAMRqstLimit = 12;
{
Function : NVRAMFPIInit
Description : Find the Object Id property in the family-tree
This is essential for message passing between FPI and kernel server task.
This is the main entry for the NVRAMFPI library, and will be called when
FPI library is loaded by the CFM.
}
FUNCTION NVRAMFPIInit: OSStatus; C;
{
Function : NVRAMAccessSync
Description : This is common entry point for synchronous access to NVRAM hardware.
This is an export in the NVRAMFPI library.
}
FUNCTION NVRAMAccessSync(offset: UInt32; VAR accessData: Byte; sizeofAccess: ByteCount; typeOfRequest: UInt32): OSStatus; C;
{
Function : NVRAMAccessAsync
Description : This is common entry point for asynchronous access to NVRAM hardware
This is an export in the NVRAMFPI library.
}
FUNCTION NVRAMAccessAsync(offset: UInt32; VAR accessData: Byte; sizeofAccess: ByteCount; someTypeofNotification: UNIV Ptr; typeOfRequest: UInt32; VAR replySize: ByteCount; VAR msgID: MessageID): OSStatus; C;
{
Test APIs or SPIs
}
FUNCTION myInitUtil: OSErr;
FUNCTION myGetSysPPtr: SysPPtr;
FUNCTION myWriteParam: OSErr;
FUNCTION myWriteXPRAM(offset: UInt32; VAR accessdata: Byte; numberOfBytes: ByteCount): OSErr;
FUNCTION myReadXPRAM(offset: UInt32; VAR accessdata: Byte; numberOfBytes: ByteCount): OSErr;
{$ENDC}
{$ALIGN RESET}
{$POP}
{$SETC UsingIncludes := NVRAMIncludes}
{$ENDC} {__NVRAM__}
{$IFC NOT UsingIncludes}
END.
{$ENDC}